//============================================================================
// Name        : 3_9.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <string>

int main() {
std::string s, result_str;
char ch;
bool has_punct = false;
std::cout << "Enter string with punctuation: " << std::endl;
getline(std::cin, s);
for(std::string::size_type index = 0; index != s.size(); ++index)
{
	ch = s[index];
	if(ispunct(ch))
	{
		has_punct = true;
	}
	else
	{
		result_str += ch;
	}
}
if(has_punct)
{
	std::cout << "result_str:" << result_str << std::endl;
}
else
{
	std::cout << "The string you input doesnot have a punctuation!" << std::endl;
	return -1;
}
	return 0;
}
